/** 管理路由 */
import Layout from '@/views/layout/lawcaseLayout'


/**
 * 客户
 */
const Router1 = {
	path: '/lawcase',
	meta: {
		title: '案件管理',
		icon: 'project',
		requiresAuth: true,
		index: 0,
		type: 'lawcase',
		subType: 'index'
	},
	children: [
		{
			path: 'index', 
			component: () => import('@/views/lawcase/index'),
			meta: {
				requiresAuth: true,
				title: '诉讼案件',
				icon: 'project',
				index: 1,
				type: 'lawcase',
				subType: 'index'
			}
		},
		{
			path: 'read/:id', 
			component: () => import('@/views/lawcase/read'),
			meta: {
				requiresAuth: true,
				title: '案件详情',
				icon: 'project',
				index: 1,
				type: 'lawcase',
				subType: 'read'
			}
		}
		
		
	]
}

const Router31 = {
	path: '/lawcase',
	component: Layout,
	name: 'lawcase',
	hidden: true,
	meta: {
		requiresAuth: true,
		title: '案件管理',
		index: 0,
		type: 'lawcase'
	},
	children: [
		{
			path: 'logindex', 
			component: () => import('@/views/lawcase/log'),
			meta: {
				requiresAuth: true,
				title: '进度日志',
				icon: 'log',
				index: 1,
				type: 'lawcase',
				subType: 'logindex'
			}
		},
		{
			path: 'courtindex', 
			component: () => import('@/views/lawcase/court'),
			meta: {
				requiresAuth: true,
				title: '开庭信息',
				icon: 'marketing',
				index: 1,
				type: 'lawcase',
				subType: 'courtindex'
			}
		},
		{
			path: 'judgmentindex', 
			component: () => import('@/views/lawcase/panjue'),
			meta: {
				requiresAuth: true,
				title: '判决信息',
				icon: 'task',
				index: 1,
				type: 'lawcase',
				subType: 'judgmentindex'
			}
		},
		{
			path: 'preservationindex', 
			component: () => import('@/views/lawcase/preservation'),
			meta: {
				requiresAuth: true,
				title: '保全信息',
				icon: 'pay',
				index: 1,
				type: 'lawcase',
				subType: 'preservationindex'
			}
		},
		{
			path: 'lawcasecomplainindex', 
			component: () => import('@/views/lawcase/complain'),
			meta: {
				requiresAuth: true,
				title: '客户反馈',
				icon: 'workbench',
				index: 1,
				type: 'lawcase',
				subType: 'lawcasecomplainindex'
			}
		}
  ]
}

const Router32 = {
	path: '/lawcase/statistics',
	meta: {
		title: '统计',
		icon: 'relevance',
		requiresAuth: true,
		index: 0,
		type: 'lawcase',
		subType: 'statistics'
	},
	children: [
		{
			path: 'statistics', 
			component: () => import('@/views/lawcase/statistics/index'),
			meta: {
				requiresAuth: true,
				title: '案件统计',
				index: 1,
				type: 'lawcase',
				subType: 'statistics'
			}
		}
		
		
	]
}

const Router = {
	path: '/lawcase',
	component: Layout,
	redirect: '/lawcase/index',
	name: 'lawcase',
	hidden: true,
	meta: {
		requiresAuth: true,
		title: '案件管理',
		index: 0,
		type: 'lawcase'
	},
	children: [
		...Router1.children,
		...Router31.children,
		...Router32.children
	]
}

export default Router

export const managerRouterMenu = [
	Router1,
	...Router31.children,
	Router32
]